<?

$g_map_feed_type_title = array(
	1	=>	"RSS",
	2	=>	"Atom",
);

function get_monitor_feed_type(&$monitor)
{
    return ($monitor->data["alert_type"] >> 16) & 0xff;
}

function get_link_to_feed(&$monitor)
{
    $type = get_monitor_feed_type($monitor);
	if ($type == 0) return "";
	
	global $g_site_root;
	return "http://".$g_site_root."/members/feed.php?".
		"mid=".$monitor->id.
		"&type=".$type.
		"&guid=".$monitor->data["activation_code"];
}

function print_feed(&$s)
{
	header("Content-Type: application/xml");
	echo $s;
}
?>
